package io.gitee.chearnee.fw.common.utils;

import lombok.experimental.UtilityClass;

import java.io.PrintWriter;
import java.io.StringWriter;

/**
 * @author cn
 * @version 1.0
 * @description
 * @date 2023/10/23 11:48
 */
@UtilityClass
public class ThrowableUtil {
    public static String toString(Throwable e) {
        StringWriter stringWriter = new StringWriter();
        e.printStackTrace(new PrintWriter(stringWriter));
        return stringWriter.toString();
    }
}
